<?php
$this->activemenu = 22;
$this->pageTitle=Yii::app()->name . ' - Hỏi Đáp';
$this->breadcrumbs=array(
		'Hỏi đáp',
);
?>
<div class="detail-page">
<div class="head-tool">
	<div class="main-title">Hỏi Đáp</div>
	<div class="send-ask"><a href="<?php echo Yii::app()->createUrl('/ask/send');?>">Gửi câu hỏi</a></div>
</div>
<div class="content-box">
	<?php if($total>0):	?>
	<?php foreach($data as $key => $item):?>
	<div class="aa-items">
	<div class="thumb-avatar"><img src="<?php echo Yii::app()->theme->baseUrl;?>/images/silhouette96.png" /></div>
	<div><span class="avatar"><?php echo $item['avatar'];?></span>&nbsp;post lúc <span class="aa-time"><?php echo date('H:i d/m/Y', strtotime($item['created_datetime']))?> mục <strong><?php echo FrontendCategoryAskModel::model()->findByPk($item['cat_id'])->name;?></strong></span>&nbsp;<span class="reply">( <img src="<?php echo Yii::app()->theme->baseUrl;?>/images/icon_reply.gif" /><?php echo FrontendAnswersModel::model()->getTotalAnswerByAsk($item['id']);?>&nbsp;)</span></div>
	<div class="content"><?php echo $item['title'];?></div>
	<div class="readmore"><a href="<?php echo Yii::app()->controller->createUrlAskDetail($item['id']);?>">Xem</a></div>
	</div>
	<?php endforeach;?>
	<div class="paging">
		 <?php 
		$this->widget('frontend.widgets.Pagination',
					array(
						'pages' => $paging,
						'maxButtonCount'=>$itemOnPaging,
						));
		?>
	</div>
	<?php endif;?>
</div>
</div>